import { get, post } from "../utils/request";



/**
 * 
 * @returns 获取医生列表
 */
export const loaddocterlistAPI =(data:any)=>get('/doctors?per'+'data',data)


/**
 * 
 * @param 注册接口
 * @returns 
 */
export const registerAPI=(data:any)=>post('/auth/reg',data)

/**
 * 
 * @param 登录接口，会返回一个token值
 * @returns 
 */
export const LoginAPI =(data:any)=>post('/auth/login',data)

/**
 * 
 * @returns 获取全部科室信息
 */
export const  sectionAPI=()=>get('/doctors/departments')
/**
 * 单个医生信息
 */
export const singleAPI=(data:any)=>get('/doctors/'+data)
/** 
 * 获取药品信息列表
 * @param data 
 * @returns 
 */
export const medicinesAPI =(data:any)=>get('/medicines',data)

/**
 * 获取药品分类
 * @param data 
 * @returns 
 */
export const categoriesAPI =()=>get('/medicines/categories')

/**
 * 药品详情
 * @returns 
 */
export const delitasAPI =(data:any)=>get('/medicines/'+data)



/* ========================================================= */

/**
 * 加入购物
 * @param data 
 * @returns 
 */
export const shopcartAPI =(data:any)=>post('/members/shop_carts',data)

/**
 * 购物车数据
 * @returns 
 */
export const cartlistAPI =()=>get('/members/shop_carts')